<template>
  <div>
    <div class="mb">
     
    </div>
    <el-table :data="data" border>
      <el-table-column label="学生" prop="studentName"></el-table-column>
      <el-table-column label="学科" prop="type"></el-table-column>
      <el-table-column label="分数" prop="score"></el-table-column>

     
    </el-table>
  
 
  </div>
</template>
<script>
import service from "@/request";

export default {
  data() {
    return {
      title: "新增",
      data: [],
      dialogVisible: false,
      form: {
        studentName: "",
      },
      name: "",
      total: 0,
      pageNum: 1,
      pageSize: 10,
      studentName: "",
      data1: [],
      data2: [],
    };
  },
  mounted() {
    this.getdata();
  
  },
  methods: {
  
    async getdata() {
   let data=JSON.parse(window.localStorage.getItem("data"));
   console.log(data)
   const res = await service.get("/score/my", {
        params:{
            studentNo:data[0].studentNo
        }
       
      });
      this.data = res.data;
    
    },
 
  },
};
</script>
<style scoped>
.mb {
  margin-bottom: 10px;
}
</style>